home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 2 / ETO Development Tools 2.iso / Tools - Objects / MacApp / MacApp CD Release / MacApp 2.0.1 (Many Libraries) / Interfaces / CIncludes / ULoMem.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-10-25  |  4.1 KB  |  107 lines  |  [TEXT/MPS ]

  1. /*[a-,body+,h-,o=100,r+,rec+,t=4,u+,#+,j=20/57/1$,n-]*/
  2. /*ULoMem.p*/
  3. /*Copyright © 1988-1990 by Apple Computer Inc.  All rights reserved*/
  4.  
  5. /* This unit provides a friendly interface to low memory variables (see Inside Macintosh.) The
  6. global "routines" are, in fact, inline functions which directly access the low memory
  7. variables. */
  8. #ifndef  __ULoMem__
  9. #define __ULoMem__  0
  10. #endif
  11. #if  ! __ULoMem__
  12. #define __ULoMem__  1
  13. #ifndef  __SYSEQU__
  14. #include "SysEqu.h"
  15. #endif
  16. #ifndef  __DEVICES__
  17. #include "Devices.h"
  18. #endif
  19.  
  20.    /*------------------------------------------------------------------------------------
  21.    NOTE: + = ROM128K or newer
  22.    ------------------------------------------------------------------------------------*/
  23.             /* This are needed for the non script manager case...*/
  24. const short kLMApFontID            = 0x984;                /* Integer - Resource ID of application font
  25.                                                          */
  26. const short kLMSysFontFam        = 0xBA6;                /*+ System font family ID or zero */
  27. const short kLMSysFontSize        = 0xBA8;
  28.    /*+ System font size (or zero for 12 point) */
  29. const short kLMTESysJust        = TESysJust;
  30.    /*+ System font size (or zero for 12 point) */
  31.             /* To here */
  32.  
  33. const short kLMHiliteMode        = HiliteMode;            /* Clr bit seven to make next QD Op use
  34.                                                          selection color */
  35. const short kLMExTable            = 0x00;                    /* Address of exception vector table */
  36.  
  37.             /* for ROMMapInsert */
  38. const short kLMmapTrue            = - 1;
  39. const short kLMmapFalse            = 0;
  40.             /* The following constants are instructions used in the various inline functions. */
  41. const short kMoveLImmed            = 0x2EBC;                /* MOVE.L of immediate data to (SP) */
  42. const short kMoveBAbsolute        = 0x1EB8;
  43.    /* MOVE.B of absolute Address data to (SP) */
  44. const short kMoveWAbsolute        = 0x3EB8;
  45.    /* MOVE.W of absolute Address data to (SP) */
  46. const short kMoveLAbsolute        = 0x2EB8;
  47.    /* MOVE.L of absolute Address data to (SP) */
  48.             /* for GetUTableBase */
  49. typedef DCtlHandle UnitTable[129];
  50. typedef UnitTable *UnitTablePtr;
  51.  
  52. typedef RgnHandle *RgnHandlePtr;
  53.  
  54. pascal CursPtr GetTheCrsr(void)
  55.     = {0x2ebc/* kMoveLImmed*/, 0x0000,0x0844/* TheCrsr*/}; /* MOVE.L #TheCrsr,(SP) */
  56.  
  57. pascal RgnHandlePtr GetSaveVisRgnPtr(void)
  58.     =  {0x41F8, 0x09F2, 0x2E88};                        /* LEA $9f2, A0 MOVE.L A0,(SP) */
  59.  
  60. pascal short GetLMMBarHeight(void)
  61.     = {0x3eb8/* kMoveWAbsolute*/, 0xBAA};                /* MOVE.W MBarHeight,(SP) ??? symbolic name
  62.                                                          in MPW 3.1 */
  63.  
  64. pascal Ptr GetCurStackBase(void)
  65.     = {0x2eb8/* kMoveLAbsolute*/,0x0908/* CurStackBase*/}; /* MOVE.L CurStackBase,(SP) */
  66.  
  67. pascal short GetHwCfgFlags(void)
  68.     = {0x3eb8/* kMoveWAbsolute*/, 0xB22};                /* MOVE.W $B22,(SP) */
  69.  
  70. pascal GrafPtr GetWindowList(void)
  71.     = {0x2eb8/* kMoveLAbsolute*/,0x09d6/* WindowList*/}; /* MOVE.L #WindowList,(SP) */
  72.  
  73. pascal short GetFSFCBLen(void)
  74.     = {0x3eb8/* kMoveWAbsolute*/, 0x3F6};                /* MOVE.W $3F6,(SP) */
  75.  
  76. pascal short GetCurJTOffset(void)
  77.     = {0x3eb8/* kMoveWAbsolute*/,0x0934/* CurJTOffset*/}; /* MOVE.W CurJTOffset,(SP) */
  78.  
  79. pascal short GetUnitNtryCnt(void)
  80.     = {0x3eb8/* kMoveWAbsolute*/,0x01d2/* UnitNtryCnt*/}; /* MOVE.W UnitNtryCnt,(SP) */
  81.  
  82. pascal UnitTablePtr GetUTableBase(void)
  83.     = {0x2eb8/* kMoveLAbsolute*/,0x011c/* UTableBase*/}; /* MOVE.L UTableBase,(SP) */
  84.  
  85. pascal SignedByte GetCrsrBusy(void)
  86.     = {0x1eb8/* kMoveBAbsolute*/,0x08cd/* CrsrBusy*/};    /* MOVE.B CrsrBusy,(SP) */
  87.  
  88. pascal Ptr GetROMMapInsert(void)
  89.     = {0x2ebc/* kMoveLImmed*/, 0x0000,0x0b9e/* RomMapInsert*/}; /* MOVE.L #ROMMapInsert,(SP) */
  90.  
  91. pascal Handle GetMenuList(void)
  92.     = {0x2eb8/* kMoveLAbsolute*/, 0xA1C};                /* MOVE.L $A1C,(SP) */
  93.  
  94. pascal Handle GetGZMoveHnd(void)
  95.     = {0x2eb8/* kMoveLAbsolute*/,0x0330/* GZMoveHnd*/}; /* MOVE.L GZMoveHnd,(SP) */
  96.  
  97. pascal Handle GetGZRootHnd(void)
  98.     = {0x2eb8/* kMoveLAbsolute*/,0x0328/* GZRootHnd*/}; /* MOVE.L GZRootHnd,(SP) */
  99.  
  100. pascal Boolean GetResLoad(void)
  101.     = {0x1eb8/* kMoveBAbsolute*/,0x0a5e/* ResLoad*/};    /* MOVE.B ResLoad,(A7) */
  102.         /* Returns the ResLoad flag from low memory.  True indicates that resources
  103.         are loaded on GetResource. */
  104.  
  105. #endif                                                    /* __ULoMem__ */
  106.  
  107.